export function getToken() {

  const tokenString = localStorage.getItem('antd-pro-token')

  return tokenString || null;
}

export function setToken(token) {
  return localStorage.setItem('antd-pro-token', token);
}


export function getUser(str) {
  const userString =
    typeof str === 'undefined' ? localStorage.getItem('antd-pro-user') : str;

  return userString;
}

export function setUser(user) {
  return localStorage.setItem('antd-pro-user', user);
}